import {Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn} from "typeorm";
import {IssueEntity} from "../../issue/entities/issue.entity";
import {ProfessionalEntity} from "../../../eduation/professional/entities/professional.entity";

@Entity('fd_survey_issue',{
    comment: '问卷题目表',
})
export class SurveyIssueEntity {
    @PrimaryGeneratedColumn({ type: 'int', name: 'id', comment: '主键ID' })
    public id: number;

    @Column({ type: 'int', name: 'issue_id', default:null, comment: '题目ID' })
    public issueId: number;

    @Column({ type: 'int', name: 'sur_id', default:null, comment: '问卷ID' })
    public surId: number;

    @Column({ type: 'int', name: 'score', default:0, comment: '题目分数' })
    public score: number;

    @ManyToOne(() => IssueEntity, issue => issue.issueId)
    @JoinColumn({ name: 'issue_id' })
    public issue: IssueEntity;
}
